package org.example;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AController {

    @Value("${server.port}")
    private String port;

    @GetMapping("/hello")
    public String hello() {
        return "Hello, A! port: " + port + " ";
    }

    @GetMapping("/name")
    public String name() {
        return "my name is A : " + port + " ";
    }

    @GetMapping("/repeat")
    public String repeat(String name) {
        System.out.println(name);
        return "your name is " + name + " : " + port + " ";
    }

}
